From 271ca5bea6ed14393b4c29c07be07409d48e04c8 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 15 Feb 2012 12:04:44 +0100 Subject: [PATCH] x86: don't allow Dom0 to map MSI-X table writably With the traditional qemu tree fixed to not use PROT_WRITE anymore in the mmap() call for this region, and with the upstream qemu tree not being capable of handling passthrough, yet, there's no need to treat Dom specially here anymore. This continues to leave unaddressed the case where PV guests map the MSI-X table page(s) before setting up the first MSI-X interrupt (see the original c/s 22182:68cc3c514a0a description for options). Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- xen/arch/x86/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 120033beeb..ff2ccd95e9 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -869,7 +869,7 @@ get_page_from_l1e( return -EINVAL; } - if ( !(l1f & _PAGE_RW) || IS_PRIV(pg_owner) || + if ( !(l1f & _PAGE_RW) || !rangeset_contains_singleton(mmio_ro_ranges, mfn) ) return 0; dprintk(XENLOG_G_WARNING, -- 2.30.2